import request from '@/utils/request'

export default {
  // 列表
  query(data) {
    return request({
      url: `/v1/purchase-demand/deliver-plan/list`,
      method: 'post',
      data
    })
  },
  // 添加
  create(data) {
    return request({
      url: `/v1/purchase-demand/deliver-plan/create`,
      method: 'post',
      data,
      returnData: true
    })
  },
  // 提交
  submit(params) {
    return request({
      url: `/v1/purchase-demand/deliver-plan/submit`,
      method: 'get',
      params
    })
  },
  // 调整
  adjust(data) {
    return request({
      url: `/v1/purchase-demand/deliver-plan/adjust`,
      method: 'post',
      data
    })
  },
  // 批量提交
  batchSubmit(data) {
    return request({
      url: `/v1/purchase-demand/deliver-plan/batch-submit`,
      method: 'post',
      data
    })
  },
  // 运营确认
  confirm(data) {
    return request({
      url: `/v1/purchase-demand/deliver-plan/confirm`,
      method: 'post',
      data
    })
  },
  // 作废
  cancel(data) {
    return request({
      url: `/v1/purchase-demand/deliver-plan/batch-cancel`,
      method: 'post',
      data
    })
  },
  // 统计
  total(data) {
    return request({
      url: `/v1/purchase-demand/deliver-plan/total`,
      method: 'post',
      data
    })
  },
  // 需求跟踪单明细
  detail(params) {
    return request({
      url: `/v1/purchase-demand/purchase-demand-sku/detail`,
      method: 'get',
      params
    })
  },
  // 查询关联关系(新增时用)
  relation(data) {
    return request({
      url: `/v1/purchase-demand/deliver-plan/get-relation`,
      method: 'post',
      data
    })
  },
  // 获取FBA备库订单数据
  getFba(data) {
    return request({
      url: `/v1/purchase-demand/deliver-plan/get-plan`,
      method: 'post',
      data
    })
  },
  //反审
  batchAuditBack(data) {
    return request({
      url: `/v1/purchase-demand/deliver-plan/batch-audit-back`,
      method: 'POST',
      data
    })
  },
  //发货计划明细
  deliverPlanDetail(params) {
    return request({
      url: `/v1/purchase-demand/deliver-plan/detail`,
      method: 'get',
      params
    })
  },
  //编辑
  edit(data) {
    return request({
      url: `/v1/purchase-demand/deliver-plan/edit`,
      method: 'post',
      data,
      returnData: true
    })
  },
  //获取销售
  getSale(data) {
    return request({
      url: `/v1/purchase-demand/deliver-plan/get-sale`,
      method: 'post',
      data
    })
  },
  //修改备注
  remark(data) {
    return request({
      url: `/v1/purchase-demand/deliver-plan/remark`,
      method: 'post',
      data
    })
  },
  //批量撤回
  revoke(data) {
    return request({
      url: `/v1/purchase-demand/deliver-plan/batch-revoke`,
      method: 'post',
      data,
      returnData: true
    })
  },
  //批量编辑
  batchEdit(data) {
    return request({
      url: `/v1/purchase-demand/deliver-plan/batch-edit`,
      method: 'post',
      data,
      returnData: true
    })
  },
  //建单后变更
  orderChange(data) {
    return request({
      url: `/v1/purchase-demand/deliver-plan/order-change`,
      method: 'post',
      data,
      returnData: true
    })
  },
  //更新运营驳回原因
  updateOperateReject(data) {
    return request({
      url: `/v1/purchase-demand/deliver-plan/update-operate-reject`,
      method: 'post',
      data,
      returnData: true
    })
  },
  //获取左侧周期
  getCycle(data) {
    return request({
      url: `/v1/purchase-demand/deliver-plan/get-cycle`,
      method: 'post',
      data,
    })
  },
  //标签页统计
  labelTotal(data) {
    return request({
      url: `/v1/purchase-demand/deliver-plan/label-total`,
      method: 'post',
      data,
    })
  },
  //导出箱维度
  exportBox(data) {
    return request({
      url: `/v1/purchase-demand/deliver-plan/export-box`,
      method: 'post',
      data,
      returnData: true
    })
  },
  //自动生成备库单
  autoCreateOversea(data) {
    return request({
      url: `/v1/purchase-demand/deliver-plan/auto-create-oversea`,
      method: 'post',
      data,
      returnData: true
    })
  },
  //获取派送方式和国家之间的关系
  processDeliveryMethod(data) {
    return request({
      url: `/v1/purchase-demand/deliver-plan/process-delivery-method`,
      method: 'post',
      data,
    })
  },
}


